// find example
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main11 () {
	int myints[] = { 10, 20, 30 ,40 };
	int * p;

	// pointer to array element:
	p = find(myints,myints+4,30);
	++p;
	cout << "The element following 30 is " << *p << endl;

	vector<int> myvector (myints,myints+4);
	vector<int>::iterator it;

	// iterator to vector element:
	it = find (myvector.begin(), myvector.end(), 30);
	++it;
	cout << "The element following 30 is " << *it << endl;

	return 0;
}

